<?php

namespace app\common\model;

use Think\Db;

/**
 * 点赞
 */
class Fabulous extends Base
{

    /**
     * 获取点赞信息
     */
    public function getALL($where)
    {
        return $this->where($where)->order('id', 'asc')->select()->toArray();
    }
     /**
     * 点赞
     */
    public function add($opt)
    {
        $result = $this->save($opt);
        if (false !== $result)
        {
            return [1, "点赞成功", $this->id];
        }
        else
        {
            return [0, $this->getError()];
        }
    }
}
